/***************************************************************************
 *   Copyright (C) 2008 by Justin L. Boss                                  *
 *   justin@rtechguys.com                                                  *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef WAVEMAP_H
#define WAVEMAP_H

#include <QGLWidget>

class WaveMap : public QGLWidget
{

		float **WaveZ;
		float **NewWaveZ;
		int WaveX;
		int WaveY;
		float Damp;
		float OffsetX;
		float OffsetY;
		float WaveSize;
	public:
		WaveMap (int width=100, int depth=100, float texture_x=1.0, float texture_y=1.0, float size=1.0, float damping=0.0, float update_speed = 100);
		~WaveMap();
		void timerEvent(QTimerEvent *) { UpdateWave(); };
		float GetOffset ();
		void UpdateWave ();
		void UpdateWave (int);
		void DisturbWave (int, int, int, int, float);
		void SetWaveDamp (float);
		void Render();
};

#endif
